Java API for XML Processing (JAXP) allows you to use several different APIs to verify, parse, and convert XML. JAXP provides both ease of use and developer neutrality. This series introduces JAXP, which consists of two parts. This article is the
Java parses XML in two ways: Dom and sax. Although Dom is W3C standard and provides a standard parsing method, its parsing efficiency has been unsatisfactory because when using Dom to parse XML, the parser reads the entire document and constructs a
1: DOM
DOM is the official W3C standard for XML documents in a way unrelated to the platform and language. DOM is a collection of nodes or information fragments organized by hierarchies. This hierarchy allows developers to search for specific
The Java SAX Parser parses xml configuration files.
Recently, Tl asked me to do the technical accumulation of the company's projects. Today, let me finish parsing the xml configuration file with the SAX Parser. I have been working on a. Net project.
Dom Parsing
In the DOM interface specification, there are four basic interfaces: Document, node, nodelist, and namednodemap. Among the four basic interfaces, the document interface is the entry for document operations, which is inherited from the
The previous article mentioned how to use Dom to parse and operate XML in Java. This article explains how to use SAX to parse and operate XML in Java, which is a little clear on the mobile platform, the XML-based event mechanism can save a lot of
2.Simple API for XML (SAX) the parser :SAXInterpreter,It can be said that a programming model that leaves the explanation work to the programmer and leaves it to itself.it did not giveDOMthat put the wholeXMLthe document is loaded into memory but is
Sax features (SAX is short for SimpleAPIforXML) 1. high resolution efficiency, less memory occupied 2. resolution can be stopped at any time. 3. the entire document cannot be loaded into memory. 4. the xml file cannot be written to xml5.SAX for
Xml| Programming Sax Concept
Sax is the abbreviation of simple API for XML, it is not the standard that is put forward by the official of the consortium, it can be said as the "folk" fact standard. In fact, it is a community-nature discussion
Parse XML using SAX
SAX is an xml parser with high resolution speed and low memory usage. It is suitable for Android and other mobile devices. An event-driven file is used to parse an XML file. That is to say, it does not need to parse a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.